<g:each in="${Proteins.keySet()}" var ="prot">
    <div class="line listline">
      <div class="element protein"><g:link controller="Protein" action="show" id="${prot}" target="_blank">${Proteins[prot].mainId}</g:link></div>
      <div class="element gene">${Proteins[prot].gene}</div>
      <div class="element description">${Proteins[prot].description}</div>
      <div class="element celllines">${Proteins[prot].nrOfCelllines.all.size()}</div>
      <div class="element histo" id="histo${prot}">
        <div class="plot" style="width:${Proteins[prot].nrOfBars*3}px;" onclick="histoClickLink(${prot});">
          <g:set var="left" value="${0}" />
          <g:each in="${Proteins[prot].cls.sort{it.key}.keySet()}" var="cls">
            <div class="cls" style="width:${Proteins[prot].cls[cls].size()*3}px; left:${left}px;">
              <g:set var="i" value="${0}" />
              <g:each in="${Proteins[prot].cls[cls]}" var="intens">
                <div class="intensity" style="height: ${((100*intens.intensity)/(Proteins[prot].projectMax[intens.project]*1.05)).toInteger()}%; background-color:${Colors[cls]}; left:${i*3}px;"></div>
                <g:set var="i" value="${i+1}" />
              </g:each>
              <g:set var="left" value="${left+(Proteins[prot].cls[cls].size()*3)}" />
            </div>
          </g:each>
        </div>
        <g:remoteLink controller="Protein" action="simpleExpressionPlots" id="${prot}" update="box" target="_blank" ></g:remoteLink>
      </div>
    </div>
</g:each>
<g:if test="${Proteins.size()==MaxEntries}">
  <div id="listNext${Offset}">
    <div class="line listline">
      <form name="hiddenSubmit">
        <g:hiddenField name="offset" value="${Offset+1}" />
        <g:hiddenField name="query" value="${Query}" />
        <g:each in="${Projects}" var="proj">
          <g:hiddenField name="project${proj}" value="${proj}" />
        </g:each>
        <g:submitToRemote action="findNextProteins" update="listNext${Offset}" class="loadNext element" value="Load Next" />
      </form>
    </div>
  </div>
</g:if>

<script type="text/javascript">resizeResultTable();nextNotClicked = true;</script>